Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Dropdown] Bugfix - Render options and placeholder inline #2054

Merged
merged 7 commits into from
Dec 20, 2024

Conversation

mark-fitzgerald
Copy link
Contributor

@mark-fitzgerald mark-fitzgerald commented Dec 20, 2024

Summary:

The dropdown widget was not rendering content properly. Punctuation and other non-alphanumeric characters were causing the content to break to their own lines, even without TeX markup. Removing the inline setting for the <Renderer> usages resolved this.

Issue: LEMS-2741

Test plan:

  1. Open Storybook
  2. Navigate to the Editor Demo page
  3. Add a Dropdown widget
  4. Type in TeX content for one of the option
  5. Add another option with regular text (all alphanumeric characters)
  6. Add another option with punctuation or other non-alphanumeric characters ($%^<>,.:)
  7. Viewing the dropdown options in the preview section should show all of the options on their own lines (single line for each)
  8. Repeat these steps for the Placeholder portion of the widget

Copy link
Contributor

github-actions bot commented Dec 20, 2024

npm Snapshot: Published

Good news!! We've packaged up the latest commit from this PR (a7d9482) and published it to npm. You
can install it using the tag PR2054.

Example:

yarn add @khanacademy/perseus@PR2054

If you are working in Khan Academy's webapp, you can run:

./dev/tools/bump_perseus_version.sh -t PR2054

Copy link
Contributor

github-actions bot commented Dec 20, 2024

Size Change: -10 B (0%)

Total Size: 1.27 MB

Filename Size Change
packages/perseus/dist/es/index.js 417 kB -10 B (0%)
ℹ️ View Unchanged
Filename Size
packages/kas/dist/es/index.js 39 kB
packages/keypad-context/dist/es/index.js 760 B
packages/kmath/dist/es/index.js 4.27 kB
packages/math-input/dist/es/index.js 78 kB
packages/math-input/dist/es/strings.js 1.79 kB
packages/perseus-core/dist/es/index.js 1.48 kB
packages/perseus-editor/dist/es/index.js 688 kB
packages/perseus-linter/dist/es/index.js 22.2 kB
packages/perseus/dist/es/strings.js 4.93 kB
packages/pure-markdown/dist/es/index.js 3.67 kB
packages/simple-markdown/dist/es/index.js 12.5 kB

compressed-size-action

Copy link
Collaborator

@jeremywiebe jeremywiebe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. This is what we paired through and I think it's correct.

Copy link
Collaborator

@jeremywiebe jeremywiebe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good with adding the className

…hat dropdowns in articles don't have added margin."

This reverts commit 3d21676.
@jeremywiebe
Copy link
Collaborator

Looks good with adding the className

Mark and I discovered that the attempted fix with className did not work. I'm reverting the commits that introduced it and we'll deal with the Articles layout issues in dropdown in 2025!

@jeremywiebe jeremywiebe merged commit f23b383 into main Dec 20, 2024
13 checks passed
@jeremywiebe jeremywiebe deleted the bugfix/dropdown-tex-rendering-inline branch December 20, 2024 23:33
jeremywiebe pushed a commit that referenced this pull request Dec 20, 2024
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.


# Releases
## @khanacademy/perseus@49.1.7

### Patch Changes

-   [#2054](#2054) [`f23b383e7`](f23b383) Thanks [@mark-fitzgerald](https://github.com/mark-fitzgerald)! - [Dropdown] Bugfix - Render options and placeholder inline

## @khanacademy/perseus-editor@17.0.12

### Patch Changes

-   Updated dependencies \[[`f23b383e7`](f23b383)]:
    -   @khanacademy/perseus@49.1.7

Author: khan-actions-bot

Reviewers: jeremywiebe

Required Reviewers:

Approved By: jeremywiebe

Checks: ⏭️  Publish npm snapshot, ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Publish Storybook to Chromatic (ubuntu-latest, 20.x)

Pull Request URL: #2056
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants